package com.edfu.core.coursemgt.persistence.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.edfu.core.identitymgt.persistence.entity.UserEnrollmentEntity;

/**
 * 
 * @author sahsharm
 *
 */
@Entity
@Table(name="semester_branch_course_user")
public class AcadSemCourseBranchUserRelnEntity implements ICourseMgtEntity {
	private long id;
	private AcadSemCourseBranchRelnEntity courseInGivenSemInBranch;
	private UserEnrollmentEntity userEnrollment;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	
	@ManyToOne
	@JoinColumn(name = "semester_branch_course_id", nullable = false)
	public AcadSemCourseBranchRelnEntity getCourseInGivenSemInBranch() {
		return courseInGivenSemInBranch;
	}
	public void setCourseInGivenSemInBranch(
			AcadSemCourseBranchRelnEntity courseInGivenSemInBranch) {
		this.courseInGivenSemInBranch = courseInGivenSemInBranch;
	}
	
	@ManyToOne
	@JoinColumn(name = "user_enrollment_id", nullable = false)
	public UserEnrollmentEntity getUserEnrollment() {
		return userEnrollment;
	}
	public void setUserEnrollment(UserEnrollmentEntity userEnrollment) {
		this.userEnrollment = userEnrollment;
	}
	
}
